home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_08 / phillip2 / makefile < prev    next >
Encoding:
Makefile  |  1994-02-27  |  19.0 KB  |  887 lines

  1. ######################################################
  2. #
  3. #   Dwayne Phillips
  4. #   The C Image Processing System
  5. #   written for
  6. #   The C Users Journal
  7. #   1990-1993
  8. #
  9. #   This makefile uses Microsoft's nmake 
  10. #   program.  See "Microsoft C Advanced Programming
  11. #   Techniques," Chapter 6, Microsoft Corp., 1990.
  12. #
  13. #
  14. #      C O N T E N T S
  15. #
  16. #   Define Macros
  17. #   Compile Source Files
  18. #   Composite Files
  19. #   CIPS Programs
  20. #   CIPS Backups
  21. #   cipscat
  22. #   fit
  23. #
  24. ######################################################
  25. #
  26. #      D E F I N E   M A C R O S
  27. #
  28. #   Microsoft C 6.0 commands
  29. #   compile options
  30. #      /AL = large memory model
  31. #      /c  = do not create .exe file
  32. #      /Zi = prepare for Codeview
  33. #      /Od = remove optimization for Codeview
  34. #      /G2 = create 80286 code instead of 8086 code
  35. #
  36. #   linker options
  37. #      /CO = prepare for Codeview
  38. #      /STACK:50000 = allocate 50000 bytes for stack
  39. #
  40.  
  41. #   Define the compile command for the large model
  42. CC = CL /AL /c
  43.  
  44. #   Define the compile command for the large model
  45. #   and the Codeview debugger
  46. CCV = CL /AL /Zi /od /c
  47.  
  48. #   Define the compile and link in one command
  49. CAL = CL /AL /o
  50.  
  51. #   Define the Codeview and stack command
  52. #   for the linker commands.
  53. #   The $* means the target's base name
  54. #   with no extensions.  So
  55. #   /STACK:40000,$*,$*; equals
  56. #   /STACK:40000,toc,toc;
  57. #ST40K = /STACK:40000,$*,$*;
  58. #ST45K = /STACK:45000,$*,$*;
  59. #ST50K = /STACK:50000,$*,$*;
  60. #COST40K = /CO /STACK:40000,$*,$*;
  61. #COST45K = /CO /STACK:45000,$*,$*;
  62. #COST50K = /CO /STACK:50000,$*,$*;
  63. #   NOTE:  When I installed my Microsoft C, I
  64. #          included the Microsoft graphics library
  65. #          in the main library.  If you did not
  66. #          do this, you should use the following
  67. #          for the stack linker commands (assuming
  68. #          you installed Microsoft C in d:):
  69. #
  70. #
  71. #   1-25-94 
  72. #   I am now using Microsoft C/C++ 7.0 so I need
  73. #   to reach the graphics.lib file.
  74.  
  75. LIBDIR = c:\c700\lib
  76.  
  77. #ST40K = /STACK:40000,$*,$*,d:\c600\lib\graphics.lib;
  78. #ST45K = /STACK:45000,$*,$*,d:\c600\lib\graphics.lib;
  79. #ST50K = /STACK:50000,$*,$*,d:\c600\lib\graphics.lib;
  80. #COST40K = /CO /STACK:40000,$*,$*,d:\c600\lib\graphics.lib;
  81. #COST45K = /CO /STACK:45000,$*,$*,d:\c600\lib\graphics.lib;
  82. #COST50K = /CO /STACK:50000,$*,$*,d:\c600\lib\graphics.lib;
  83. ST40K = /STACK:40000,$*,$*,$(LIBDIR)\graphics.lib;
  84. ST45K = /STACK:45000,$*,$*,$(LIBDIR)\graphics.lib;
  85. ST50K = /STACK:50000,$*,$*,$(LIBDIR)\graphics.lib;
  86. COST40K = /CO /STACK:40000,$*,$*,$(LIBDIR)\graphics.lib;
  87. COST45K = /CO /STACK:45000,$*,$*,$(LIBDIR)\graphics.lib;
  88. COST50K = /CO /STACK:50000,$*,$*,$(LIBDIR)\graphics.lib;
  89.  
  90.  
  91.  
  92.  
  93. ######################################################
  94. #
  95. #      C O M P I L E   S O U R C E   F I L E S
  96. #
  97.  
  98. pattern.obj :  pattern.c cips.h
  99.      $(CC) pattern.c
  100.  
  101. segment3.obj :  segment3.c cips.h
  102.      $(CC) segment3.c
  103.  
  104. roundoff.obj :  roundoff.c cips.h
  105.      $(CC) roundoff.c
  106.  
  107. ndir.obj :  ndir.c
  108.      $(CC) ndir.c
  109.  
  110. tiff.obj :  tiff.c cips.h
  111.      $(CC) tiff.c
  112.  
  113. gin.obj :  gin.c cips.h
  114.      $(CC) gin.c
  115.  
  116. rstring.obj :  rstring.c cips.h
  117.      $(CC) rstring.c
  118.  
  119. texture.obj :  texture.c cips.h
  120.      $(CC) texture.c
  121.  
  122. xtra.obj :  xtra.c cips.h
  123.      $(CC) xtra.c
  124.  
  125. txtrsubs.obj :  txtrsubs.c cips.h
  126.      $(CC) txtrsubs.c
  127.  
  128. geosubs.obj :  geosubs.c cips.h
  129.      $(CC) geosubs.c
  130.  
  131. warpsubs.obj :  warpsubs.c cips.h
  132.      $(CC) warpsubs.c
  133.  
  134. geometry.obj :  geometry.c cips.h
  135.      $(CC) geometry.c
  136.  
  137. warp.obj :  warp.c cips.h
  138.      $(CC) warp.c
  139.  
  140. mrw.obj :  mrw.c cips.h
  141.      $(CC) mrw.c
  142.  
  143. mof.obj :  mof.c cips.h
  144.      $(CC) mof.c
  145.  
  146. rtiff.obj :  rtiff.c cips.h
  147.      $(CC) rtiff.c
  148.  
  149. cips.obj :  cips.c cips.h
  150.      $(CC) cips.c
  151.  
  152. show.obj :  show.c cips.h
  153.      $(CC) show.c
  154.  
  155. cipspr.obj :  cipspr.c cips.h
  156.      $(CC) cipspr.c
  157.  
  158. gpcips.obj :  gpcips.c cips.h
  159.      $(CC) gpcips.c
  160.  
  161. mymsc.obj :  mymsc.c cips.h
  162.      $(CC) mymsc.c
  163.  
  164. fwrite.obj :  fwrite.c cips.h
  165.      $(CC) fwrite.c
  166.  
  167. numcvrt.obj :  numcvrt.c cips.h
  168.      $(CC) numcvrt.c
  169.  
  170. display.obj :  display.c cips.h
  171.      $(CC) display.c
  172. #   xdisplay.c is a version of display.c
  173. #   containing experimental code that
  174. #   is not used in CIPS
  175. xdisplay.obj :  xdisplay.c cips.h
  176.      $(CC) xdisplay.c
  177.  
  178. hist.obj :  hist.c cips.h
  179.      $(CC) hist.c
  180.  
  181. strappnd.obj :  strappnd.c cips.h
  182.      $(CC) strappnd.c
  183.  
  184. pi.obj :  pi.c cips.h
  185.      $(CC) pi.c
  186.  
  187. ht.obj :  ht.c cips.h
  188.      $(CC) ht.c
  189.  
  190. djet.obj :  djet.c cips.h
  191.      $(CC) djet.c
  192.  
  193. filter.obj :  filter.c cips.h
  194.      $(CC) filter.c
  195.  
  196. addsub.obj :  addsub.c cips.h
  197.      $(CC) addsub.c
  198.  
  199. rotate.obj :  rotate.c cips.h
  200.      $(CC) rotate.c
  201.  
  202. cutp.obj :  cutp.c cips.h
  203.      $(CC) cutp.c
  204.  
  205. scale.obj :  scale.c cips.h
  206.      $(CC) scale.c
  207.  
  208. mainas.obj :  mainas.c cips.h
  209.      $(CC) mainas.c
  210.  
  211. mainr.obj :  mainr.c cips.h
  212.      $(CC) mainr.c
  213.  
  214. maincp.obj :  maincp.c cips.h
  215.      $(CC) maincp.c
  216.  
  217. main422.obj : main422.c cips.h
  218.      $(CC) main422.c
  219.  
  220. half.obj : half.c cips.h
  221.      $(CC) half.c
  222.  
  223. double.obj :  double.c cips.h
  224.      $(CC) double.c
  225.  
  226. stretch.obj :  stretch.c cips.h
  227.      $(CC) stretch.c
  228.  
  229. side.obj : side.c cips.h
  230.      $(CC) side.c
  231.  
  232. edge.obj :  edge.c cips.h
  233.      $(CC) edge.c
  234.  
  235. edge2.obj :  edge2.c cips.h
  236.      $(CC) edge2.c
  237.  
  238. edge3.obj :  edge3.c cips.h
  239.      $(CC) edge3.c
  240.  
  241. wtiff.obj :  wtiff.c cips.h
  242.      $(CC) wtiff.c
  243.  
  244. create.obj :  create.c cips.h
  245.      $(CC) create.c
  246.  
  247. wtiffh.obj :  wtiffh.c cips.h
  248.      $(CC) wtiffh.c
  249.  
  250. boole.obj : boole.c cips.h
  251.      $(CC) boole.c
  252.  
  253. boolean.obj : boolean.c cips.h
  254.      $(CC) boolean.c
  255.  
  256. overlay.obj : overlay.c cips.h
  257.      $(CC) overlay.c
  258.  
  259. ed.obj : ed.c cips.h
  260.      $(CC) ed.c
  261.  
  262. skeleton.obj : skeleton.c cips.h
  263.      $(CC) skeleton.c
  264.  
  265. mainsk.obj : mainsk.c cips.h
  266.      $(CC) mainsk.c
  267. invert.obj : invert.c cips.h
  268.      $(CC) invert.c
  269.  
  270. mainover.obj : mainover.c cips.h
  271.      $(CC) mainover.c
  272.  
  273. mainedge.obj :  mainedge.c cips.h
  274.      $(CC) mainedge.c
  275.  
  276. mainhist.obj :  mainhist.c cips.h
  277.      $(CC) mainhist.c
  278.  
  279. mainfilt.obj :  mainfilt.c cips.h
  280.      $(CC) mainfilt.c
  281.  
  282. mainseg.obj : mainseg.c cips.h
  283.      $(CC) mainseg.c
  284.  
  285. main2seg.obj : main2seg.c cips.h
  286.      $(CC) main2seg.c
  287.  
  288. main3seg.obj : main3seg.c cips.h
  289.      $(CC) main3seg.c
  290.  
  291. fixt.obj : fixt.c cips.h
  292.      $(CC) fixt.c
  293.  
  294. unfixt.obj : unfixt.c cips.h
  295.      $(CC) unfixt.c
  296.  
  297. segment.obj : segment.c cips.h
  298.      $(CC) segment.c
  299.  
  300. segment2.obj :  segment2.c cips.h
  301.      $(CC) segment2.c
  302.  
  303. ###############################################
  304. #
  305. #      C O M P O S I T E   F I L E S
  306. #
  307. #  Composite files are like small libraries.
  308. #  A composite file contains several .c file
  309. #  concatenated together.  This makes the
  310. #  command lines shorter for linking the .obj
  311. #  files into .exe files.
  312. #
  313. #  The cipscat program (see end of makefile)
  314. #  concatenates these together automatically.
  315. #
  316. #
  317. #
  318. #
  319. #  COMPOSITE FILE
  320. #  tiffs.c = rtiff.c + wtiff.c + tiff.c
  321. tiffs.obj :  tiffs.c cips.h
  322.      $(CC) tiffs.c
  323.  
  324. tiffs.c: rtiff.c  wtiff.c  tiff.c
  325.      cipscat rtiff.c  wtiff.c  tiff.c -o tiffs.c
  326.  
  327.  
  328.  
  329. #  COMPOSITE FILE
  330. # cips2.c = rstring + mof + mrw + gpcips
  331. #           + numcvrt + strappnd
  332. #
  333. #   The above was changed to the below
  334. #   12 May 1993
  335. #
  336. # cips2.c = gpcips + numcvrt + mymsc.c
  337. cips2.obj :  cips2.c cips.h
  338.      $(CC) cips2.c
  339.  
  340. cips2.c: gpcips.c numcvrt.c mymsc.c
  341.      cipscat gpcips.c numcvrt.c mymsc.c -o cips2.c
  342.  
  343.  
  344.  
  345. #  COMPOSITE FILE
  346. # cips3.c = addsub + cutp + rotate
  347. cips3.obj :  cips3.c cips.h
  348.      $(CC) cips3.c
  349.  
  350. cips3.c: addsub.c cutp.c rotate.c
  351.      cipscat addsub.c cutp.c rotate.c -o cips3.c
  352.  
  353.  
  354.  
  355. #  COMPOSITE FILE
  356. # cips4.c = gin + fwrite + hist + pi + ht
  357. #
  358. #   The above was changed to the below
  359. #   12 May 1993
  360. #
  361. # cips4.c = gin + hist + pi + ht
  362. cips4.obj :  cips4.c cips.h
  363.      $(CC) cips4.c
  364.  
  365. cips4.c: gin.c  hist.c  pi.c  ht.c
  366.      cipscat gin.c hist.c pi.c ht.c -o cips4.c
  367.  
  368.  
  369.  
  370. #  COMPOSITE FILE
  371. # cips5.c = boole + overlay + txtrsubs
  372. cips5.obj :  cips5.c cips.h
  373.      $(CC) cips5.c
  374.  
  375. cips5.c: boole.c overlay.c txtrsubs.c
  376.      cipscat boole.c overlay.c txtrsubs.c -o cips5.c
  377.  
  378.  
  379.  
  380. #  COMPOSITE FILE
  381. # cips6.c = filter + display + djet + scale
  382. cips6.obj :  cips6.c cips.h
  383.      $(CC) cips6.c
  384.  
  385. cips6.c: filter.c display.c djet.c scale.c
  386.      cipscat filter.c display.c djet.c scale.c -o cips6.c
  387.  
  388.  
  389.  
  390. #  COMPOSITE FILE
  391. # cips7.c = filter + display + djet + scale
  392. cips7.obj :  cips7.c cips.h
  393.      $(CC) cips7.c
  394.  
  395. cips7.c: ed.c skeleton.c segment.c segment2.c
  396.      cipscat ed.c skeleton.c segment.c segment2.c -o cips7.c
  397.  
  398.  
  399.  
  400. #  COMPOSITE FILE
  401. # edges.c = edge.c + edge2.c + edge3.c
  402. edges.obj :  edges.c cips.h
  403.      $(CC) edges.c
  404.  
  405. edges.c: edge.c edge2.c edge3.c
  406.      cipscat edge.c edge2.c edge3.c -o edges.c
  407.  
  408.  
  409.  
  410. ######################################################
  411. #
  412. #      C I P S   P R O G R A M S
  413. #
  414. #   Special make targets:
  415. #      allip - makes all .exe's - may not work because
  416. #              the compiler runs out of heap space and
  417. #              things like that.  Use the makeall.bat
  418. #              file to do this
  419. #
  420. #      cleanobj - deletes all the .obj files
  421. #      cleanexe - deletes all the .exe files
  422. #
  423.  
  424.  
  425. allip:
  426.    nmake cipscat.exe
  427.    nmake cips.exe
  428.    nmake mainedge.exe
  429.    nmake mainhist.exe
  430.    nmake mainfilt.exe
  431.    nmake mainas.exe
  432.    nmake mainr.exe
  433.    nmake maincp.exe
  434.    nmake main422.exe
  435.    nmake side.exe
  436.    nmake half.exe
  437.    nmake double.exe
  438.    nmake stretch.exe
  439.    nmake create.exe
  440.    nmake mainseg.exe
  441.    nmake main2seg
  442.    nmake pattern.exe
  443.    nmake roundoff.exe
  444.    nmake show.exe
  445.    nmake cipspr.exe
  446.    nmake fixt.exe
  447.    nmake unfixt.exe
  448.    nmake boolean.exe
  449.    nmake mainover.exe
  450.    nmake invert.exe
  451.    nmake mainsk.exe
  452.    nmake ilabel.exe
  453.    nmake texture.exe
  454.    nmake geometry.exe
  455.    nmake warp.exe
  456.  
  457. cleanobj:
  458.      del *.obj
  459.  
  460. cleanexe:
  461.      del *.exe
  462.  
  463.  
  464. ######################################################
  465. #
  466. #      Define the files needed by CIPS
  467. #      First define the C source files and then
  468. #      define the object files and link files
  469. #      in terms of the source files.
  470. #
  471. #      If you add any files to cips, you only
  472. #      need to add them to CIPSSRC.
  473. #
  474. #              17 October 1992
  475.  
  476. CIPSSRC = tiffs.c edges.c \
  477. cips.c cips2.c cips3.c cips4.c cips5.c cips6.c \
  478. cips7.c fitt.c geosubs.c warpsubs.c
  479.  
  480. CIPSOBJ  = $(CIPSSRC:.c=.obj)
  481. CIPSLIST = $(CIPSSRC:.c=)
  482.  
  483. cips.exe: $(CIPSOBJ)
  484.      link $(CIPSLIST) $(ST45K)
  485. cips: cips.exe
  486.  
  487.  
  488.  
  489. ######################################################
  490. #
  491. #     Define the stand alone application programs
  492. #     in a similar manner as cips above.
  493.  
  494.  
  495. SHOWSRC = tiffs.c cips4.c cips2.c show.c \
  496.           display.c cips3.c
  497. SHOWOBJ  = $(SHOWSRC:.c=.obj)
  498. SHOWLIST = $(SHOWSRC:.c=)
  499. show: show.exe
  500. show.exe: $(SHOWOBJ)
  501.      link $(SHOWLIST) $(ST45K)
  502.  
  503.  
  504. STSTSRC = tiffs.c cips4.c cips2.c showtest.c \
  505.           disptest.c cips3.c
  506. STSTOBJ  = $(STSTSRC:.c=.obj)
  507. STSTLIST = $(STSTSRC:.c=)
  508. showtest: showtest.exe
  509. showtest.exe: $(STSTOBJ)
  510.      link $(STSTLIST) $(ST45K)
  511.  
  512.  
  513.  
  514. CIPSPRSRC = tiffs.c cips4.c cips2.c cipspr.c djet.c \
  515.             cips3.c display.c
  516. CIPSPROBJ  = $(CIPSPRSRC:.c=.obj)
  517. CIPSPRLIST = $(CIPSPRSRC:.c=)
  518. cipspr: cipspr.exe
  519. cipspr.exe: $(CIPSPROBJ)
  520.      link $(CIPSPRLIST) $(ST45K)
  521.  
  522.  
  523.  
  524. ESRC  = tiffs.c gin.c cips2.c mainedge.c \
  525.         edges.c filter.c
  526. EOBJ  = $(ESRC:.c=.obj)
  527. ELIST = $(ESRC:.c=)
  528. mainedge.exe: $(EOBJ)
  529.      link $(ELIST) $(ST50K)
  530. mainedge: mainedge.exe
  531.  
  532.  
  533.  
  534. TSRC  = tiffs.c gin.c cips2.c texture.c \
  535.         txtrsubs.c filter.c edges.c fitt.c
  536. TOBJ  = $(TSRC:.c=.obj)
  537. TLIST = $(TSRC:.c=)
  538. texture.exe: $(TOBJ)
  539.      link $(TLIST) $(ST50K)
  540. texture: texture.exe
  541.  
  542.  
  543.  
  544. GSRC  = tiffs.c gin.c cips2.c geometry.c \
  545.         geosubs.c 
  546. GOBJ  = $(GSRC:.c=.obj)
  547. GLIST = $(GSRC:.c=)
  548. geometry.exe: $(GOBJ)
  549.      link $(GLIST) $(ST40K)
  550. geometry: geometry.exe
  551.  
  552.  
  553.  
  554. WSRC  = tiffs.c gin.c cips2.c warp.c \
  555.         warpsubs.c geosubs.c 
  556. WOBJ  = $(WSRC:.c=.obj)
  557. WLIST = $(WSRC:.c=)
  558. warp.exe: $(WOBJ)
  559.      link $(WLIST) $(ST40K)
  560. warp: warp.exe
  561.  
  562.  
  563.  
  564. MHSRC  = tiffs.c cips4.c cips2.c mainhist.c
  565. MHOBJ  = $(MHSRC:.c=.obj)
  566. MHLIST = $(MHSRC:.c=)
  567. mainhist.exe: $(MHOBJ)
  568.      link  $(MHLIST) $(ST45K)
  569. mainhist: mainhist.exe
  570.  
  571.  
  572.  
  573. MFSRC  = tiffs.c cips2.c cips4.c mainfilt.c \
  574.          edge.c filter.c
  575. MFOBJ  = $(MFSRC:.c=.obj)
  576. MFLIST = $(MFSRC:.c=)
  577. mainfilt.exe: $(MFOBJ)
  578.      link $(MFLIST) $(ST45K)
  579. mainfilt: mainfilt.exe
  580.  
  581.  
  582.  
  583. MASSRC  = tiffs.c cips2.c cips4.c edge.c \
  584.           mainas.c addsub.c
  585. MASOBJ  = $(MASSRC:.c=.obj)
  586. MASLIST = $(MASSRC:.c=)
  587. mainas.exe: $(MASOBJ)
  588.      link $(MASLIST) $(ST45K)
  589. mainas: mainas.exe
  590.  
  591.  
  592.  
  593. MRSRC  = tiffs.c cips2.c mainr.c edge.c rotate.c
  594. MROBJ  = $(MRSRC:.c=.obj)
  595. MRLIST = $(MRSRC:.c=)
  596. mainr.exe: $(MROBJ)
  597.      link  $(MRLIST) $(ST45K)
  598. mainr: mainr.exe
  599.  
  600.  
  601.  
  602. maincp: maincp.exe
  603. MCPSRC  = tiffs.c cips2.c maincp.c cutp.c
  604. MCPOBJ  = $(MCPSRC:.c=.obj)
  605. MCPLIST = $(MCPSRC:.c=)
  606. maincp.exe: $(MCPOBJ)
  607.      link  $(MCPLIST) $(ST45K)
  608.  
  609.  
  610.  
  611. SIDESRC  = tiffs.c cips2.c side.c cutp.c
  612. SIDEOBJ  = $(SIDESRC:.c=.obj)
  613. SIDELIST = $(SIDESRC:.c=)
  614. side.exe: $(SIDEOBJ)
  615.      link $(SIDELIST) $(ST45K)
  616. side: side.exe
  617.  
  618.  
  619. M422SRC  = tiffs.c cips2.c main422.c edge.c \
  620.            scale.c filter.c
  621. M422OBJ  = $(M422SRC:.c=.obj)
  622. M422LIST = $(M422SRC:.c=)
  623. main422.exe: $(M422OBJ)
  624.      link  $(M422LIST) $(ST45K)
  625. main422: main422.exe
  626.  
  627.  
  628.  
  629. DBSRC  = tiffs.c cips2.c double.c \
  630.          edge.c filter.c
  631. DBOBJ  = $(DBSRC:.c=.obj)
  632. DBLIST = $(DBSRC:.c=)
  633. double.exe: $(DBOBJ)
  634.      link  $(DBLIST) $(ST45K)
  635. double: double.exe
  636.  
  637.  
  638.  
  639. STSRC  = tiffs.c cips2.c stretch.c
  640. STOBJ  = $(STSRC:.c=.obj)
  641. STLIST = $(STSRC:.c=)
  642. stretch.exe: $(STOBJ)
  643.      link  $(STLIST) $(ST45K)
  644. stretch: stretch.exe
  645.  
  646.  
  647.  
  648. HASRC  = tiffs.c cips2.c half.c edge.c \
  649.          scale.c filter.c
  650. HAOBJ  = $(HASRC:.c=.obj)
  651. HALIST = $(HASRC:.c=)
  652. half.exe: $(HAOBJ)
  653.      link  $(HALIST) $(ST45K)
  654. half: half.exe
  655.  
  656.  
  657.  
  658. CRSRC  =  tiffs.c cips2.c create.c
  659. CROBJ  = $(CRSRC:.c=.obj)
  660. CRLIST = $(CRSRC:.c=)
  661. create.exe: $(CROBJ)
  662.      link  $(CRLIST) $(ST45K)
  663. create: create.exe
  664.  
  665.  
  666.  
  667. PATSRC  = pattern.c tiffs.c cips2.c
  668. PATOBJ  = $(PATSRC:.c=.obj)
  669. PATLIST = $(PATSRC:.c=)
  670. pattern.exe: $(PATOBJ)
  671.      link  $(PATLIST) $(ST45K)
  672. pattern: pattern.exe
  673.  
  674.  
  675.  
  676. ROUNDSRC = roundoff.c tiff.c gin.c cips2.c \
  677.            rtiff.c wtiff.c
  678. ROUNDOBJ = $(ROUNDSRC:.c=.obj)
  679. ROUNDLIST = $(ROUNDSRC:.c=)
  680. roundoff.exe: $(ROUNDOBJ)
  681.      link  $(ROUNDLIST) $(ST45K)
  682. roundoff: roundoff.exe
  683.  
  684.  
  685.  
  686.  
  687. MAIN2SRC  = tiffs.c cips2.c cips4.c cips7.c \
  688.             edges.c filter.c main2seg.c
  689. MAIN2OBJ  = $(MAIN2SRC:.c=.obj)
  690. MAIN2LIST = $(MAIN2SRC:.c=)
  691. main2seg.exe: $(MAIN2OBJ)
  692.      link $(MAIN2LIST) $(ST40K)
  693. main2seg: main2seg.exe
  694.  
  695.  
  696. SEGSRC = tiffs.c cips2.c mainseg.c segment.c cips4.c
  697. SEGOBJ  = $(SEGSRC:.c=.obj)
  698. SEGLIST = $(SEGSRC:.c=)
  699. mainseg.exe: $(SEGOBJ)
  700.      link  $(SEGLIST) $(ST45K)
  701. mainseg: mainseg.exe
  702.  
  703.  
  704. FIXTSRC = tiff.c cips2.c rtiff.c fixt.c wtiff.c
  705. FIXTOBJ  = $(FIXTSRC:.c=.obj)
  706. FIXTLIST = $(FIXTSRC:.c=)
  707. fixt.exe: $(FIXTOBJ)
  708.     link  $(FIXTLIST) $(ST40K)
  709. fixt: fixt.exe
  710.  
  711.  
  712.  
  713. UNFIXTSRC = tiff.c cips2.c rtiff.c unfixt.c wtiff.c
  714. UNFIXTOBJ  = $(UNFIXTSRC:.c=.obj)
  715. UNFIXTLIST = $(UNFIXTSRC:.c=)
  716. unfixt.exe: $(UNFIXTOBJ)
  717.     link  $(UNFIXTLIST) $(ST40K)
  718. unfixt: unfixt.exe
  719.  
  720.  
  721.  
  722. BOOLSRC  = tiffs.c boolean.c boole.c cips2.c
  723. BOOLOBJ  = $(BOOLSRC:.c=.obj)
  724. BOOLLIST = $(BOOLSRC:.c=)
  725. boolean.exe: $(BOOLOBJ)
  726.     link  $(BOOLLIST) $(ST40K)
  727. boolean: boolean.exe
  728.  
  729.  
  730.  
  731. OVERSRC  = tiffs.c mainover.c overlay.c cips2.c
  732. OVEROBJ  = $(OVERSRC:.c=.obj)
  733. OVERLIST = $(OVERSRC:.c=)
  734. mainover.exe: $(OVEROBJ)
  735.     link  $(OVERLIST) $(ST45K)
  736. mainover: mainover.exe
  737.  
  738.  
  739.  
  740. INVSRC  = tiffs.c invert.c cips2.c
  741. INVOBJ  = $(INVSRC:.c=.obj)
  742. INVLIST = $(INVSRC:.c=)
  743. invert.exe: $(INVOBJ)
  744.     link  $(INVLIST) $(ST40K)
  745. invert: invert.exe
  746.  
  747.  
  748.  
  749. SKSRC  = cips7.c tiffs.c mainsk.c cips2.c \
  750.          edges.c filter.c
  751. SKOBJ  = $(SKSRC:.c=.obj)
  752. SKLIST = $(SKSRC:.c=)
  753. mainsk.exe: $(SKOBJ)
  754.     link  $(SKLIST) $(ST40K)
  755. mainsk: mainsk.exe
  756.  
  757.  
  758. ILSRC  = ilabel.c tiffs.c cips2.c
  759. ILOBJ  = $(ILSRC:.c=.obj)
  760. ILLIST = $(ILSRC:.c=)
  761. ilabel.exe: $(ILOBJ)
  762.     link  $(ILLIST) $(ST40K)
  763. ilabel: ilabel.exe
  764.  
  765.  
  766.  
  767. ######################################################
  768. #
  769. #      C I P S   B A C K U P S
  770. #
  771. #      Create a backup utility that will copy all the
  772. #      CIPS source code files to a floppy disk given
  773. #      by CIPSFLOPPY.
  774.  
  775. CIPSFLOPPY = a:
  776.  
  777. #      Now - this is the master backup command
  778.  
  779. cipsbackup:
  780.      nmake bcipscp
  781.      nmake bcipsxtra
  782.      nmake bcipsh
  783.      nmake bcipsmain
  784.  
  785. #      The copy command copy $** copies all of the
  786. #      dependent files to cipsfloppy
  787. #
  788. #      First define a backup for the CIPSSRC files
  789.  
  790. bcipscp: $(CIPSSRC)
  791.      !copy $** $(CIPSFLOPPY)
  792.  
  793. #      CIPSH is all the included .h files
  794.  
  795. CIPSH      = cips.h makeall.bat
  796.  
  797. #      CIPSXTRA is all the individual files I used
  798. #      to create the composite files.
  799.  
  800. CIPSXTRA   = rstring.c gpcips.c numcvrt.c \
  801.              addsub.c cutp.c rotate.c xdisplay.c \
  802.              edge.c edge2.c edge3.c segment.c \
  803.              segment2.c wtiff.c rtiff.c tiff.c \
  804.              gin.c fwrite.c hist.c pi.c ht.c \
  805.              ed.c skeleton.c cipscat.c mymsc.c \
  806.              boole.c overlay.c txtrsubs.c djet.c \
  807.              filter.c display.c scale.c
  808.  
  809. #      CIPSMAIN is all the main files for the extra
  810. #      programs.
  811.  
  812. CIPSMAIN   = mainedge.c mainhist.c mainfilt.c \
  813.              mainas.c maincp.c mainr.c main422.c \
  814.              half.c double.c side.c create.c \
  815.              mainseg.c pattern.c roundoff.c \
  816.              fixt.c main2seg.c show.c \
  817.              unfixt.c boolean.c mainover.c invert.c \
  818.              mainsk.c ilabel.c cipspr.c texture.c \
  819.              geometry.c warp.c
  820.  
  821. #      Backup the xtra files
  822.  
  823. bcipsxtra: $(CIPSXTRA)
  824.      copy  makefile $(CIPSFLOPPY)
  825.      !copy $** $(CIPSFLOPPY)
  826.  
  827. #      Backup the include .h  files
  828.  
  829. bcipsh: $(CIPSH)
  830.      !copy $** $(CIPSFLOPPY)
  831.  
  832. #      Backup the main.c files
  833.  
  834. bcipsmain: $(CIPSMAIN)
  835.      !copy $** $(CIPSFLOPPY)
  836.  
  837. ######################################################
  838. #
  839. #     C I P S C A T
  840. #
  841. #   The cipscat program concatenates .c files together
  842. #   but only copies the first occurance of the
  843. #   include cips.h statement.  This allows you to put
  844. #   together files such as addsub.c cutp.c rotate.c
  845. #   into cips3.c with one command:
  846. #   cipscat addsub.c cutp.c rotate.c -o cips3.c
  847.  
  848. cipscat.obj: cipscat.c
  849.      $(CC) cipscat.c
  850.  
  851. cipscat.exe: cipscat.obj
  852.      link cipscat $(ST40K)
  853. cipscat: cipscat.exe
  854.  
  855.  
  856. ######################################################
  857. #
  858. #     F I T
  859. #
  860. #   The following is a special test program to
  861. #   test the fit routine's ability to fit data
  862. #   to a straight line.  The code in the file fitt.c
  863. #   is from Numerical Recipies in C.
  864. #   21 August 1993
  865.  
  866.  
  867. FITSSRC = fitt.c mainfit.c
  868. FITSOBJ  = $(FITSSRC:.c=.obj)
  869. FITSLIST = $(FITSSRC:.c=)
  870.  
  871. mainfit.exe: $(FITSOBJ)
  872.      link $(FITSLIST) $(ST45K)
  873. mainfit: mainfit.exe
  874.  
  875. mainfit.obj :  mainfit.c cips.h
  876.      $(CC) mainfit.c
  877.  
  878. fitt.obj :  fitt.c cips.h
  879.      $(CC) fitt.c
  880.  
  881. stupid.obj: stupid.c
  882.      $(CC) stupid.c
  883.  
  884. stupid.exe: stupid.obj
  885.      link stupid $(ST40K)
  886. stupid: stupid.exe
  887.